using System;
using CUtil;
//XML serializing does not work with this class 
// for future use 
namespace CStock
{

	
//	/// <summary>
//	/// Summary description for ITradeCondition.
//	/// </summary>
	public interface ITrader : IStockObjectBase
	{

        bool SetMyOrdersFromTradeSystems(int myDateIndex, DateTime currentDate, bool btradeBreak);
        string TradeSystemName { get;set;} 

        bool TradeDataItem_Sell(string myIdDataItem, int numberOfItems, double price);
        bool TradeDataItem_Buy(IDataItem diBuy, int numberOfItems, double price);
        
		double Money_Initial {get;set;}
        double ShareBuyOrderValue{ get;set;}
        
        string TradeEnd { get;set;}
        DateTime TradeStart { get;set;}
        int TradeBreaks { get;set;}
        double Value_Assets { get;}
        double Value_Total { get;}
        double Value_Deposits { get;}
        double Value_Shares { get;}
        double Money_Current { get;set;}



        ITradeSystem TradeSystem1 { get;set;}
        ITradeSystem TradeSystem2 { get;set;}
        ITradeSystem TradeSystem3 { get;set;}
        ITradeSystem TradeSystem4 { get;set;}

        

        IPortfolios Portfolios{ get;set;}
        IAssets Assets { get;set;}
        IDeposits Deposits{ get;set;}

        NameObjectCollection MoneyTransfers { get;set;}
        ITradeSimulation TradeSimulation { get;set;}	
        //ITradeSimulation TradeSimulation { get;set;}



        IOrders Orders { get;set;}

        

       IPortfolio Portfolio_Simulation { get;set;}


       IPortfolio Portfolio_Selected { get;set;}
       void Portfolio_Delete(IPortfolio deletePortfolio);
       bool ContainPortfolio(string name);
        IPortfolio GetPortfolioByID(string name);
       IPortfolio Portfolio_GetOrCreate(string portfolioName);


        //------
      
      
      

       void UserTradeDateUp(int numberOfDays);

       void RefreshShareItems();

       void RefreshIndicatorsOfDataClass(bool recalculate, IDataClass dc);

       DateTime GetFirstDateForPortfolio(IPortfolio port);

       DateTime GetLastDateForPortfolio(IPortfolio port);
      
       


        bool PortfolioExists(string name);
        //System.Collections.ArrayList TradeSystemsAvailable { get;}

        TimeSpan GetChartTimeSpan();
        void AdjustChartLimits();
        void ChangeDatePeriod(bool directionUp);

        void SetDatePeriod(DatePeriods dp);


        void MoveDatePeriod(DateMove myMove);

        bool SetDefaultPortfolioAndShare();

      
	}
}
